import { gameRoom } from '@/api/game';

const state = {
    gameRuleInfos: {
    },
};

const mutations = {
    SET_GAME_INFO: (state, gameRuleInfos) => {
        state.gameRuleInfos = gameRuleInfos;
    },
};

const actions = {
    async getGameRulesInfo({ commit }) {
        let param = {}
        const MineInfoResponse = await gameRoom(param);
        const ganmeRuluseInfo = MineInfoResponse.data.data;
        // 将获取到的游戏配置信息保存到state中
        commit('SET_GAME_INFO', ganmeRuluseInfo);
    },
};

export default {
    namespaced: true,
    state,
    mutations,
    actions
};
